<?php

    class Zend_Controller_Action_Helper_FolderHelper extends Zend_Controller_Action_Helper_Abstract{

        public function createFolder($identity, $type){
            if($type == 'logo'){
            	$path = 'img/logos';
                //$folderName = mb_substr($identity,0,2, 'UTF-8');
            	$folderName = substr($identity,0,1);
            }else{
            	$path = 'pdf';
            	$folderName = substr($identity,0,1);
            } 
            if(!is_dir(APPLICATION_PATH.'/../public/'.$path.'/'.$folderName)){
                mkdir (APPLICATION_PATH.'/../public/'.$path.'/'.$folderName);	
            }
            
            return $folderName;
        }

    }